package com.eugeneli.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：EugeneLi
 * @date ：Created in 2020/2/14 18:02
 * @modified By：
 */
@RestController
public class HelloController {

    //只是在业务逻辑中获取一下配置文件的某项值
    @Value("${person.name}")
    private String name;

    @RequestMapping("/hello")
    public String hello(){
        return "hello"+name;

    }
}
